package com.spring.le.service.impl;

import com.spring.le.anno.Save;
import com.spring.le.dao.AddressDao;
import com.spring.le.mapper.AddressMapper;
import com.spring.le.model.Address;
import com.spring.le.service.AddressService;
import lombok.AllArgsConstructor;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;
import java.util.List;

@Service("addressService")
@AllArgsConstructor
public class AddressServiceImpl implements AddressService {
    @Setter
    private AddressDao addressDao;


    @Override
    public int insert(Address address) {
        System.out.println("SUCCESS");
        System.out.println("creatBy:"+address.getCreatBy());
        System.out.println("creatTime:"+address.getCreatTime());
        return addressDao.insert(address);
    }
}
